﻿<%@ Page Title="Admin Rediger Nyhed" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="adminNewsEdit.aspx.cs" Inherits="UCNKompetenceBors.Admin.adminNewsEdit" Culture="auto" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript">
        function Hide() {
            document.getElementById('<%=lblConfirmUpdatedNews.ClientID %>').style.display = 'none';
            return false;
        }
    </script>

    <div id="adminWrapper" class="contentSmallWrapper floatLeft">
        <div id="adminSubMenuBox" class="submenuBox floatLeft">
            <div class="subMenuBoxContent">
                <ul>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminDashboard" runat="server" Text="Admin Dashboard"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkUserHandling" runat="server" Text="Brugerhåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminExchange" runat="server" Text="Køb og Salg"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkNewsHandling" runat="server" Text="Nyhedshåndtering" ForeColor="#FF9933"></asp:HyperLink>
                        <ul>
                            <li>
                                <asp:HyperLink ID="hyLinkAdminCreateNews" runat="server" Text="Opret Nyhed"></asp:HyperLink></li>
                        </ul>
                    </li>
                    <li>
                        <asp:HyperLink ID="hyLinkEditInformation" runat="server" Text="Ret Information"></asp:HyperLink></li>
                    <li><asp:HyperLink ID="hyLinkContactPerson" runat="server" Text="kontaktpersoner"></asp:HyperLink></li>
                    <li><asp:HyperLink ID="hylinkDepartment" runat="server" Text="Afdelinger"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkResetUsers" runat="server" Text="Reset Brugere"></asp:HyperLink></li>
                </ul>
            </div>
        </div>

        <div id="adminContentBox" class="contentBoxSmall floatLeft">
            <div id="adminContentBoxContent" class="floatLeft">
                <div class="inputFormSmall">
                    <div class="inputFormSmallLeft floatLeft">
                        <div class="inputFormSmallRow floatLeft">
                            <asp:Label ID="lblAdminContentHeader" runat="server" Text="Rediger nyhed" CssClass="contentTitle"></asp:Label>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblCreatedDate" runat="server" Visible="false"></asp:Label>
                                <asp:Label ID="lblEditNewsTitle" runat="server" Text="Titel:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditNewsTitle" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalTitle" runat="server" ErrorMessage="Title is required" ToolTip="Title is required" Text="*" ControlToValidate="txtEditNewsTitle" ValidationGroup="AdminEditNews" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="floatLeft">
                                <asp:Label ID="lblEditNewsText" runat="server" Text="Tekst:"></asp:Label>
                                <br />
                                <br />
                                <CKEditor:CKEditorControl ID="ckeditorEditNewsText" BasePath="/ckeditor/" runat="server"></CKEditor:CKEditorControl>
                            </div>
                            <div class="inputFormEditorValidation floatRight">
                                <asp:RequiredFieldValidator ID="rfvalText" runat="server" ErrorMessage="Text is required" ToolTip="Text is required" Text="*" ControlToValidate="ckeditorEditNewsText" ValidationGroup="AdminEditNews" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <asp:Label ID="lblLocalized" runat="server" Text="Engelsk nyhed" CssClass="contentTitle"></asp:Label>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditNewsLocalizedTitle" runat="server" Text="Engelsk Titel:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditNewsLocalizedTitle" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalEditNewsLocalizedTitle" runat="server" ErrorMessage="English Title is required" ToolTip="English Title is required" Text="*" ControlToValidate="txtEditNewsLocalizedTitle" ValidationGroup="AdminEditNews" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="floatLeft">
                                <asp:Label ID="lblEditNewsLocalizedText" runat="server" Text="Engelsk Tekst:"></asp:Label>
                                <br />
                                <br />
                                <CKEditor:CKEditorControl ID="ckeditorEditNewsLocalizedText" BasePath="/ckeditor/" runat="server"></CKEditor:CKEditorControl>
                            </div>
                            <div class="inputFormEditorValidation floatRight">
                                <asp:RequiredFieldValidator ID="rfvalEditNewsLocalizedText" runat="server" ErrorMessage="English Text is required" ToolTip="English Text is required" Text="*" ControlToValidate="ckeditorEditNewsLocalizedText" ValidationGroup="AdminEditNews" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Image ID="imgEditNewsImage" runat="server" Width="350px" Height="350px" />
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditNewsImage" runat="server" Text="Billede:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:FileUpload ID="fuEditNewsImage" runat="server" />
                                <br />
                                <asp:RegularExpressionValidator ID="regexvalEditNewsImage" runat="server" ForeColor="Red" ControlToValidate="fuEditNewsImage" ValidationGroup="AdminEditNews" ErrorMessage="Filen du prøver at uploade er ikke tilladt" ValidationExpression=".*(\.[Jj][Pp][Gg]|\.[Gg][Ii][Ff]|\.[Jj][Pp][Ee][Gg]|\.[Pp][Nn][Gg])"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="floatLeft">
                                <asp:Label ID="lblConfirmUpdatedNews" runat="server"></asp:Label>
                            </div>
                            <div class="inputFormButtonMargin floatRight">
                                <asp:Button ID="btnCancelEditNews" runat="server" Text="Fortryd" CssClass="button" OnClick="btnCancelEditNews_Click" />
                                <asp:Button ID="btnAdminEditNews" runat="server" Text="Rediger Nyhed" CssClass="button" ValidationGroup="AdminEditNews" OnClientClick="Hide()" OnClick="btnAdminEditNews_Click" />
                            </div>
                        </div>
                    </div>
                    <div class="inputFormSmallRight floatRight">
                        <asp:ValidationSummary ID="valSumAdminEditNews" ValidationGroup="AdminEditNews" runat="server" HeaderText="Følgende fejl blev fundet:" ForeColor="Red" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
